Skip to content

chore: migrate from @alyne.com to @alyne scope (GitHub Packages)#4

Open
bhushaan wants to merge 1 commit intomasterfrom
chore/migrate-github-packages
Open

chore: migrate from @alyne.com to @alyne scope (GitHub Packages)#4
bhushaan wants to merge 1 commit intomasterfrom
chore/migrate-github-packages

Conversation

@bhushaan
Copy link

Summary

  • Update package name from sqs-consumer to @alyne/sqs-consumer
  • Update .npmrc to use GitHub Packages registry (NPM_TOKEN_GPH)
  • Regenerate lock file

Test plan

  • Verify npm install works with NPM_TOKEN_GPH set
  • Verify no @alyne.com/ references remain

🤖 Generated with Claude Code

- Update package name to @alyne/sqs-consumer
- Update .npmrc to use GitHub Packages registry with NPM_TOKEN_GPH
- Regenerate lock file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@manuel-reil
Copy link
Member

manuel-reil commented Feb 27, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ayushsri9179
Copy link

Acceptance Criteria

  • yarn install / npm install succeeds with NPM_TOKEN_GPH set in the environment
  • No remaining references to @alyne.com/ exist anywhere in the repository (source, config, lock files)
  • All existing tests passing locally — npm test

Also tested sqs-consumer script seperately:

producer.js

const { Q } = require('@alyne/lib-q');

let q;

const messages = new Set();
function _addToMessages(message, prefix = '') {
  const messageId = prefix + JSON.stringify(message);
  messages.add(messageId);
}

const INSTANCE_NAME = 'test';
const sqsConfig = require('./sqsConfig');

const chismeId = 'lib-q-test';

const redisConfig = {
  url: 'redis://localhost:6379'
};

const chismeConfig = {
  chismeId,
  chismeHandlers: {
    doIt: () => {
      _addToMessages({}, chismeId);
    }
  }
};

const RPC = 'rpc';
const REPLIES = 'replies';

async function produceMessage() {
    q = new Q({
      redisConfig,
      chismeConfig,
      sqsConfig,
      instanceName: INSTANCE_NAME
    });

  await q.init();

  await q.task({
    queueName: RPC,
    type: RPC,
    body: {
      type: 'services',
      item: 'exampleService',
      method: 'processData',
      params: ['param1', 'param2']
    }
  });
  console.log('Task sent using q with region:', q.awsRegion);

};

produceMessage();

consumer.js

const { Consumer } = require('@alyne/sqs-consumer');
const { SQSClient } = require('@aws-sdk/client-sqs');

const sqsClient = new SQSClient({
  region: 'eu-west-1',
  endpoint: 'http://localhost:4566',
  credentials: {
    accessKeyId: 'test',
    secretAccessKey: 'test'
  }
});

const queueUrl = 'http://localhost:4566/000000000000/my-queue';

const app = Consumer.create({
  queueUrl,
  handleMessage: async (message) => {
    const body = JSON.parse(message.Body);
    console.log('Received message:', body);
  },
  sqs: sqsClient
});

app.on('error', (err) => {
  console.error('Error:', err.message);
});

app.on('processing_error', (err) => {
  console.error('Processing error:', err.message);
});

app.on('message_received', (message) => {
  console.log('Message received, ID:', message.MessageId);
});

app.on('message_processed', (message) => {
  console.log('Message processed, ID:', message.MessageId);
});

app.on('empty', () => {
  console.log('Queue is empty');
});

console.log('Queue URL:', queueUrl);
console.log('Starting SQS consumer on my-queue...');
app.start();

Seems to be working fine

W: @bhushaan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants